<template>
    <tr>
        <td><input type="checkbox" @click="choose" :checked='bool'></td>
        <td>{{ name }}</td>
        <td>{{ price }}</td>
        <td><button @click="redu">-</button>{{ num }}<button @click="Add">+</button></td>
        <td>{{ sum }}</td>
        <td><button @click="delbtn">删除</button></td>
    </tr>
</template>

<script>
export default {
  props:['name','price','num','sum','bool','index'],
  methods:{
    choose(){
      this.$emit('addbtn',this.index)
    },
    delbtn(){
      this.$emit('delBtn',this.index)
    },
    redu(){
      this.$emit('reduBtn',this.index)
    },
    Add(){
      this.$emit('fnbtn',this.index)
    }
  }
}
</script>

<style>

</style>